/*
 *         Copyright (c) KUBOTA Corporation and HUDSON SOFT,
 *                  1994, 1995 All Rights Reserved
 *
 *  This software comprises unpublished confidential information of
 *  KUBOTA Corp. and HUDSON SOFT. It may not be used, copied or made 
 *  available to anyone, except in accordance with the license under
 *  which it is furnished.
 */
static char SccsId[] = "@(#)actrans.c	1.3 9/19/95";
#include <farl.h>
#include <agl.h>

/*
 * Translate Camera
 */
void
AGLTranslateCamera(fix187 dx, fix187 dy, fix187 dz)
{
     fix187	vwork[3];

     vwork[0] = dx;
     vwork[1] = dy;
     vwork[2] = dz;
     FarlSetSrcMatrix3x1(vwork);
     FarlMul3x3M187((unsigned short*)__AGLCamera.camTrans);
     FarlCopyDstToMem3x1(vwork);
     if (__AGLCamera.camChanged == -2) {
	   FarlGetTranslate4x4M187( vwork[0], vwork[1], vwork[2],
		   (unsigned short*)__AGLCamera.camMatrix187);
	   __AGLCamera.camChanged = -1;
     } else {
	   FarlSetSrcMatrix((unsigned short*)__AGLCamera.camMatrix187);
	   FarlTranslate4x4M187(vwork[0], vwork[1], vwork[2]);
	   FarlCopyDstToMem4x4((unsigned short*)__AGLCamera.camMatrix187); 
     }
}
